unit MenuButton;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
  System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs,
   Vcl.ExtCtrls, Vcl.StdCtrls, Vcl.Imaging.pngimage;

type
  TfrMenuButton = class(TFrame)
    Panel: TPanel;
    Button: TLabel;
    Image: TImage;
    procedure ButtonClick(Sender: TObject);
    procedure ButtonMouseEnter(Sender: TObject);
    procedure ButtonMouseLeave(Sender: TObject);
  private
    const
      m = $00453426;
    const
      m1 = $00564110;
    { Private declarations }
  public
    { Public declarations }
  end;

implementation

uses
  MsgWidget;

{$R *.dfm}
procedure TfrMenuButton.ButtonMouseEnter(Sender: TObject);
begin
 // Label1.Font.Color := clBlue;
  self.Color := m;
end;

procedure TfrMenuButton.ButtonMouseLeave(Sender: TObject);
begin
 // Label1.Font.Color := clWhite;
  Self.Color := m1;
end;

procedure TfrMenuButton.ButtonClick(Sender: TObject);
begin

  SendMessage(MainFromHande, WM_MENUBUTTONCLICK_MSG, 0, Integer(PChar(self.Name)));
end;

end.

